<DOCTYPE html>
<html>
	<head>
		<title>住院费用</title>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <link rel="stylesheet" type="text/css" href="../../css/jquery.mobile-1.4.0.css" />
        <link rel="stylesheet" type="text/css" href="../../css/zpdydhl_mobile.css">
        <link rel="stylesheet" type="text/css" href="../../css/mobiscroll.custom-2.6.2.min.css">
        <script type="text/javascript" src="../../js/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="../../js/zpdydhl_mobile.js"></script>
        <script type="text/javascript" src="../../js/mobiscroll.custom-2.6.2.min.js"></script>
        <style type="text/css">
        /*加载loding*/
        .spinner {
          margin: 5px auto 0;
          width: 150px;
          text-align: center;
          position: fixed;
        }

        .spinner > div {
          width: 20px;
          height: 20px;
          background-color: #67CF22;

          border-radius: 100%;
          display: inline-block;
          -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
          animation: bouncedelay 1.4s infinite ease-in-out;
          /* Prevent first frame from flickering when animation starts */
          -webkit-animation-fill-mode: both;
          animation-fill-mode: both;
        }

        .spinner .bounce1 {
          -webkit-animation-delay: -0.32s;
          animation-delay: -0.32s;
        }

        .spinner .bounce2 {
          -webkit-animation-delay: -0.16s;
          animation-delay: -0.16s;
        }

        @-webkit-keyframes bouncedelay {
          0%, 80%, 100% { -webkit-transform: scale(0.0) }
          40% { -webkit-transform: scale(1.0) }
        }

        @keyframes bouncedelay {
          0%, 80%, 100% {
            transform: scale(0.0);
            -webkit-transform: scale(0.0);
          } 40% {
            transform: scale(1.0);
            -webkit-transform: scale(1.0);
          }
        }
        /*end*/
    </style>
	</head>

	<body>
		<div class="ui-page ui-page-theme-c ui-page-header-fixed ui-page-active">


            <div data-role="content" class="content ui-content" style="" id="zhuyuan_feiyong_list_content">
                <ul data-role="listview" data-theme="a" class="ui-listview ui-group-theme-a">

                </ul>
            </div>


        </div>
        <script>
            $(function(){
				//setHeader();
                document_type_global = "zhuyuan_feiyong";
                //获取住院费用

            });

            //住院费用信息
            function getZhuyuanFeiyong(){
				setHeader();
                 $.ajax({
                    type: "get",
                    async: true,
                    url:server_url+"Mobile/Feiyong/getZhuyaunFeiyong/zhuyuan_id/"+patient_info_global.zhuyuan_id+yiyuan_id,
                    data: {},
                    dataType: "jsonp",
                    jsonp: "callbackGetZhuyaunFeiyong",
                    jsonpCallback:"feedBackStateGetZhuyaunFeiyong",
                    error:function(mes)
                    {
                        alert(mes);
                    },
                    beforeSend: loading,
                    success: function(result) {
                        if(result.ret=="success")
                        {
                            feiyong_list = result.data;
                            str = "";
                            if(result.data == null){
                                alert("未查到"+patient_info_global.xingming+"的相关住院费用信息");
                                $("#zhuyuan_feiyong_list_content").find("ul").html(str);
                                return;
                            }
                            for (var i = 0; i < result.data.length; i++) {
								if(result.data[i]["feiyong_value"]==null)
									result.data[i]["feiyong_value"]=0;
                                str+="<li class='ui-li-static ui-body-inherit ui-first-child'>";
                                str+="<div class='ui-grid-a'>";
								if(result.data[i]["feiyong_type"]=="欠费")
								{
									str+="<div class='ui-block-a' style='text-align:center;color:red'><span>"+result.data[i]["feiyong_type"]+"</span></div>";
									str+="<div class='ui-block-b' style='float:right; text-align:right;margin-right:20px; width:70px;color:red'><span>"+result.data[i]["feiyong_value"]+"</span></div>";
								}
								else
								{
									str+="<div class='ui-block-a' style='text-align:center;font-size:16px'><span>"+result.data[i]["feiyong_type"]+"</span></div>";
									str+="<div class='ui-block-b' style='float:right; text-align:right;margin-right:20px; width:70px;font-size:16px'><span>"+result.data[i]["feiyong_value"]+"</span></div>";
								}
                                str+="</div>";
                                str+="</li>";
                            };
                            $("#zhuyuan_feiyong_list_content").find("ul").html(str);
                            /*加载loding消失*/
                            $('#m').remove();
                            $('#lo').remove();
                            /*end*/

                        }
                        else
                        {
                            alert("数据加载失败，请稍后重试");
                        }
                    }
                });
            }
			function refreshData()
			{
				getZhuyuanFeiyong();
				$(".ui-page").show();
			}
        </script>
	</body>
</html>
